<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>management</title>
<meta name="Keywords" content="" /> 
<meta name="Description" content="" />
<link type="text/css" rel="stylesheet" href="/css/management.css" />
<script src="/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<div class="wrapper">
	<div class="mod_box">
		<div class="hd"><span class="tl"></span><span class="tr"></span></div>
		<div class="bd">
			<!--面包屑 begin-->
			<div class="crumb">Location：<a href="javascript:void(0);">Supervisor</a> &gt; reset Password</div>
			<!--面包屑 end-->
			<!--表单 begin-->
			<form action="/index.php?r=supervisor/resetSave" method="post" id="mainform">
			<table class="mod_table">
				<tbody>
					<tr>
						<th><i class="must">*</i>New password：</th>
						<td>
							<input type="text" class="ipt_text" name="password"/>
						</td>
					</tr>
					<tr>
						<th><i class="must">*</i>Confirm Password：</th>
						<td>
							<input type="password" class="ipt_text" name="confirm_password"/>
						</td>
					</tr>
				</tbody>
			</table>
			</form>
			<!--表单 end-->
			<!--表格外提交区域 begin-->
			<div class="btn_tool">
				<a class="btn" href="javascript:void(0);" onclick="formSubmit();"><span>commit</span></a>
			</div>
			<!--表格外提交区域 end-->
		</div>
		<div class="ft"><span class="bl"></span><span class="br"></span></div>
	</div>
</div>
<script type="text/javascript">
	function formSubmit(){
		var commit = true;
		
		$(".mod_table").find("input[type='text']").each(function(){
			if($(this).val() == ""){
				alert("所有项都是必填！");
				commit = false;
				return false;
			}
		});
		
		if($("input[name='password']").val() != $("input[name='confirm_password']").val()){
			alert("两次输入密码不一致！");
			commit = false;
			return false;
		}
		
		if(commit){
			$("#mainform").submit();
		}
	}
</script>
</body>
</html>